<%@ tag import="com.mfp.java.testYou.ui.mvc.SelectListComponent" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="editButtonId" required="false" %>
<%@ attribute name="deleteButtonId" required="false" %>
<%@ attribute name="formName" required="false" %>
<%@ attribute name="validate" required="true" %>
<%@ tag body-content="empty" %>

<%SelectListComponent select = new SelectListComponent(request,response);%>
<c:choose>
    <c:when test="${validate}">
        <select class="height150px" style="width: 200px" size="<%=select.getSize()%>" name="<%=select.getName()%>" id="select"
            onchange="activateButton('${editButtonId}', '${formName}', '${deleteButtonId}');">
    </c:when>
    <c:otherwise>
      <select class="height150px" style="width: 200px" size="<%=select.getSize()%>" name="<%=select.getName()%>" id="select" />
    </c:otherwise>
</c:choose>
<c:forEach var="test" items="<%=select.getList()%>">
	<option value="${test.id}">${test.text}</option>
</c:forEach>
</select>
